Fix/ios cert secret guard - #545
Merged
Merged
Conversation
`^3\d\d,\d\d\d km$` says the Moon is between 300,000 and 399,999 km away. It runs from about 356,500 km at perigee to about 406,700 km at apogee, so that pattern is true for most of a lunar month and false near apogee — a test that passes for three weeks and fails in the fourth, on nobody's change. It failed today. What the assertion is actually for is the formatting: a grouped number of kilometres rather than a bare double. Six digits says that without also asserting where the Moon is.
The first run of this step died on
base64: stdin: (null): error decoding base64 input stream
Error: Process completed with exit code 1
which names neither the secret nor the mistake, in a step whose whole job
is to stop a signing problem from being cryptic.
The value was a *path* rather than the file's contents. I could not find
any other input that produces that message: empty, wrapped lines, stray
spaces and even a PEM header all decode without complaint on macOS, so the
one thing it does say is the one thing it says badly.
So the decode is guarded and its result is checked. Whitespace is stripped
first, because a value that travelled through a browser text field arrives
with whatever that field did to it, and `base64 --decode` is not uniformly
forgiving about it across runner images. Then the bytes have to start 0x30,
the DER SEQUENCE tag — a .cer, a PEM or a truncated paste all reach
`security import` otherwise, and it answers "Unknown format in import",
which is the same problem one layer further down.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做了什麼
相關 issue
怎麼驗
檢查清單
tool/check/commits.sh origin/main..HEAD通過—— commit 訊息就是更新日誌,格式見 commit.md
mise exec -- flutter analyze與mise exec -- flutter test通過AppLocalizations,沒有寫死AppSpacing/AppRadius/AppMotion,深色模式看過,文字對比度可接受